home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
C-Communications
/
(c)c6.d64
/
term 1660.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
9KB
|
320 lines
0 IFPEEK(22784)<>76THENLOAD"DISKTERM2",8,1
10 IFPEEK(49152)<>169THENLOAD"DISKTERM1",8,1
15 POKE650,128
20 POKE646,0:POKE251,0:POKE252,99
30 N%=0:NX%=12
40 POKE51224,255
50 POKE24816,6:POKE24817,0:REM 300BAUD 8BIT NO PARITY
60 POKE53280,11:POKE646,14:POKE53281,0
70 GOSUB7000
80 N%=N%+1
90 REM IFN%=1ANDNX%=12THENSYS24832
100 R%=5:MO%=6:SE$="":ML=22784
110 POKE56,86:POKE644,86:CLR:OPEN5,2,0,CHR$(PEEK(24816))+CHR$(PEEK(24817))
120 RE$=" ":SE$=" ":MO%=134:R%=0:C$="0123456789ABCDEF"
130 RP=2:RS=0:WP=RP:WS=RS
140 POKE24575,RP:POKE24574,RS+96:POKE24573,WP:POKE24572,WS+96
150 PA(0)=10:PA(1)=6:PA(2)=2
160 ML=22784:PRINTCHR$(14):POKE24569,0
170 OPEN1,8,15:POKE556,0:POKE552,0:POKE553,1
180 DN$="":GOTO200
190 PRINT:PRINT"[212]ERMINAL [205]ODE":GET#5,A$,A$:SYSML+0:CLOSE11:POKE24569,0:TM=0
200 POKE53280,11:POKE53281,0:BS=PEEK(51224)
201 PRINT"[147][158][198]UNCTION: [152][194]LOCK [211]IZE =[154]"BS:PRINT"[158][163][163][163][163][163][163][163][163]"
210 PRINT"[153]1 - [152][212]ERMINAL [205]ODE":PRINT"[153]2 - [154][207]LD [208]ROTOCALL/[211]END [208][210][199]"
220 PRINT"[153]3 - [154][207]LD [208]ROTOCALL/[210]ECEIVE [208][210][199]"
230 PRINT"[153]4 - [129][196]ISK [195]OMMANDS":PRINT"[153]5 - [150][193]NSWER [208]HONE":PRINT"[153]6 - [150][200]ANG [213]P!"
240 TY$="PSP"
250 PRINT"[153]7 - [158][193]UTODIAL/[193]UTOANSWER"
260 PRINT"[153]8 - [154][206]EW [208]ROTOCALL/[211]END [208][210][199]":PRINT"[153]9 - [154][206]EW [208]ROTOCALL/[210]ECEIVE [208][210][199]"
270 PRINT"[153]0 - [195]HANGE [194]LOCK [211]IZE"
280 PRINT"[153][209] - [209]UIT[151]"
290 GETA$:IFA$=""THEN290
300 IFA$="Q"ORA$="[209]"THEN880
310 ONVAL(A$)GOTO190,670,330,2340,20000,20000,1160,3160,3200:IFA$="0"THEN3250
320 GOTO290
330 REM RECEIVE A PROGRAM
340 PRINT"[206]AME OF [198]ILE?"
350 PRINT"[196]EFAULT DRIVE IS #0":PRINT">";:GOSUB920:S$=B$
360 IFS$=""THENPRINT#5,"A";:GOTO190
370 IFMID$(S$,2,1)<>":"THENS$="0:"+S$
380 GOSUB580:S$="@"+S$+T$+",W"
390 CLOSE2:OPEN2,8,2,S$:GOSUB990:IFESTHENPRINTES$:CLOSE2:GOTO340
400 PRINT#5,"TTTTTTTTTT";
410 FORX=0TO10:NEXT:GET#5,A$:IFST=0THEN410
420 SYSML+18:IFSTTHEN470
430 FORX=0TO10:NEXT:GET#5,A$:IFST=0THEN430
440 S1=PEEK(ML-2):S2=PEEK(ML-1):SYSML+12
450 IFS1<>PEEK(ML-2)ORS2<>PEEK(ML-1)THEN480
460 SYSML+15:PRINT#5,"";:PRINT"-";:GOTO410
470 CLOSE2:PRINT#5,"SSSSSSSSSS";:PRINT:GOTO190
480 PRINT#5,"";:PRINT":";:GOTO410
490 PRINT"[212]YPE OF [198]ILE:"
500 PRINT"([208])ROGRAM, ([215])ORD[208]RO, OR ([211])EQ?":PRINT">";
510 GETB$:IFB$=""THEN510
520 TY$=B$:FL=0
530 IFB$="P"THENT$=",P":POKE557,0:PRINT"[208]ROGRAM":RETURN
540 IFB$="S"THENT$=",S":POKE557,0:PRINT"[211][197][209]":RETURN
550 IFB$="W"THENT$=",P":POKE557,1:PRINT"[215]ORD[208]RO":RETURN
560 IFB$=CHR$(13)THENFL=1:RETURN
570 GOTO510
580 PRINT#5,"UUUUUUUUUU";
590 GET#5,A$:IFST<>0THEN590
600 IFA$="P"THENT$=",P":POKE557,0:A$="[208]ROGRAM":GOTO640
610 IFA$="S"THENT$=",S":POKE557,0:A$="[211][197][209]":GOTO640
620 IFA$="W"THENT$=",P":POKE557,1:A$="[215]ORD[208]RO":GOTO640
630 GOTO590
640 PRINT"[198]ILE [212]YPE: "A$""
650 GET#5,A$:IFST=0THEN650
660 RETURN
670 REM SEND AN SEQ FILE TO BULLETIN BOARD
680 PRINT"[206]AME OF [198]ILE TO [211]END?":PRINT">";:GOSUB920:S$=B$
690 IFS$=""THENPRINT#5,"A";:GOTO190
700 GOSUB490:IFFLTHENS$="":GOTO690
710 CLOSE2:OPEN2,8,2,S$+T$:GOSUB990:IFESTHENPRINTES$:CLOSE2:GOTO680
720 FORX=1TO10:PRINT#5,TY$;:NEXTX:PRINT
730 GET#5,A$:IFST<>0ORA$<>"U"THEN730
740 GET#5,A$:IFPEEK(667)<>PEEK(668)THEN740
750 SYSML+9:CK=ST
760 FORX=1TO400:NEXT
770 GET#5,A$:IFPEEK(667)<>PEEK(668)THEN770
780 FORT=0TO255:PRINT#5,CHR$(PEEK(ML-256+T));:NEXTT
790 PRINT#5,"ZZZZZZZZZZZZZZZ";
800 IFPEEK(669)<>PEEK(670)THEN800
810 GET#5,A$:IFST<>0THEN810
820 IFA$=""THENPRINT":";:GOTO760
830 IFA$<>""THEN810
840 IFCK=0THENPRINT"-";:GOTO740
850 GET#5,A$:IFPEEK(667)<>PEEK(668)THEN850
860 CLOSE2:GOTO190
870 SYSML+21:A$=CHR$(PEEK(634)):RETURN
880 REM QUIT TERMINAL
890 CLOSE5:CLOSE1:CLOSE2:CLOSE11
900 PRINTCHR$(9)
910 END
920 PRINT" [146][157]";:B$=""
930 GETA$:IFA$=""THEN930
940 IFA$=CHR$(20)THEN970
950 IFA$=CHR$(13)THENPRINT" ":RETURN
960 B$=B$+A$:PRINT" [157]"A$" [146][157]";:GOTO930
970 IFLEN(B$)=0THEN930
980 B$=LEFT$(B$,LEN(B$)-1):PRINTA$;:GOTO930
990 REM GET ERROR CHANNEL
1000 INPUT#1,E1$,E2$,E3$,E4$
1010 ES$=E1$+","+E2$+","+E3$+","+E4$
1020 ES=VAL(E1$):RETURN
1030 POKE22784,0:RUN
1160 B1=56577:B2=56579
1170 PRINT"[147][193]UTODIAL [211]ECTION "
1180 PRINT"[211]ELECT [207]NE:
1190 [153]"[ATN]NSWER AN RIGHT$(null)LEN(null)(null)RIGHT$(null)CHR$ LENALL"
1200 [153]"[STR$]IAL OUT"
1205 [153]"(null)RESS ANY OTHER KEY TO ATNPEEK(null)(null)(null)!"
1210 [161]A$:[139]A$[178]""[137]1210
1220 [139]A$[178]"A"[167] [137]1250
1230 [139]A$[178]"D"[167][137]1310
1240 [137]200
1250 [141]1630:[151]B1,127:[153]"MOVE O-A SWITCH TO ANSWER.":[153]:[153]
1260 [153]"WAITING FOR RING..."
1270 X[178][194](B1)
1275 [153]"(null)VALVAL(null)(56577)="[194](56577),"(null)VALVAL(null)(56579)="[194](56579)
1280 [139]X[179][177]127[167][153]"(null)ING STR$ETECTED!":[151]56579,32:[151]56577,95:[137]2290
1285 [153]"(null)VALVAL(null)(56577)="[194](56577),"(null)VALVAL(null)(56579)="[194](56579)
1290 [137]1270
1300 [128]
1310 [151]B2,38:[151]B1,45
1320 [153]"LOADPEEKULLETIN PEEKOARDS AVAILABLEWAIT":[141]1640:[153]"(null)ELECT YOUR CHOICE":[141]1790
1330 [153]" ":[137]1360
1340 [153]"ONVALNTER NUMBER TO DIAL CMDCMD";:[133]D$
1350 [142]
1360 [151]56579,38:[151]56577,95:T[178]50
1370 T[178]T[171]1:[139]T[179][177]0[137]1370
1380 D[178][195](D$):[129]X[178]1[164]D:N$[178][202](D$,X,1)
1390 [153]""N$"WAIT";:N[178][197](N$):[139]N[178]0[167]N[178]10
1400 [139]N$[179]"0"[176]N$[177]"9"[167][130]X:[137]1420
1410 [141]1450:[130]X
1420 NT[178]NT[170]1:[129]XB[178]1[164](40[171]D):[153]" ";:[130]XB
1430 [153]"STR$IALING VALNDED .... (null)UMBER OF TRIES";NT:[137]1540
1440 [153]"CHR$OING TO (null)ERMINAL (null)ODE":[153]QL$:[137]190
1450 [129]N1[178]1[164]N
1460 [151]56577,45
1470 [129]T[178]1[164]10:[130]T
1480 [151]56579,38:[151]56577,95
1490 [129]T[178]1[164]10:[130]T
1500 [130]N1
1510 [129]T[178]1[164]200:[130]T
1520 [142]
1530 [128]
1540 [153]"ASC1=(null)EW (null)UMBER"
1545 [153]"ASC3=(null)EDIAL (null)HIS (null)UMBER"
1550 [153]"ASC5=(null)ERMINAL (null)ODE"
1560 CR[178]0:[129]ZZ[178]1700[164]1000[169][171]1:[161]A$:[139]A$[178]"DIM"[167]1610
1570 [139]A$[178]"INPUT"[137]1310
1575 [139]A$[178]"READ"[167]190
1580 [139][194](B1)[178]47[167]CR[178]CR[170]1:[139]CR[177]20[167]2290
1585 [139][194](B1)[178]46[167]1610
1590 [139]A$[178]"LET"[167]200
1600 [130]ZZ
1610 [151]B1,45:[129]ZZ[178]1[164]2000:[130]
1620 [153]"ONONONONON CMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMD CMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMDON":[137]1360
1630 [129]ZZ[178]1[164]36:[153]:[130]ZZ:[142]
1640 [153]"1.PEEKBBBS.STR$WN. 2.PEEKBBBS.STR$WN. 3.PEEKBBBS.MSG "
1650 [153]"4.PEEKBBBS.MSG. 5.LENOMSPEC 6.(null)ORTEC "
1660 [153]"7.RIGHT$NFO.SYS. 8.LENAMPUTERS 9.(null)OONRISE"
1670 [153]"10.PEEKUG PEEKOARD 11.ATNFTER LEFT$RS. 12.(null).(null).RIGHT$."
1680 [153]"13.(null)IBRARY 14.RIGHT$NTER ASCACE 15.ATNLMOST LEFT$VN";
1690 [153]"16.RIGHT$NFO-(null)EK 17.ASCLIGHT DEK 18.1ST LENHOICE";
1700 [153]"19.(null)IDTEK 20.ATNLIEN (null)RLD 21.(null)TUDENTS"
1710 [153]"22.LEFT$EADBANG. 23.(null)AGIC RIGHT$RIGHT$ 24.(null)OLAR PEEK."
1720 [153]"25.CHR$RAVEYARD 26.(null)ISS (null)ET 2 27.(null)IZ-ATNMP."
1730 [153]"28.(null)OBOTICS 29.(null)RASH LENAN 30.(null)OFTWORX"
1740 [153]"31.(null)IM(PEEK(null)(null)(null)) 32.(null)COTT (null)ELL 33.ATNRMAN PEEKPEEK(null)"
1750 [153]"34. LEN.ASC.(null).(null) 35. (null)WAMP 36.PEEKUY& (null)ELL"
1760 [153]"37. (null)ANGAURD 38. (null)TELEX 39. (null)HERLOCK"
1770 [153]"40. (null)ARTS CHR$LR41. (null)ONE OF THE ABOVEPOKE"
1780 [142]
1790 NT[178]0
1800 [153]"";
1810 [133]A$:[139][197](A$)[178]0[167]A$[178]"16":[153]"16"
1820 [145][197](A$)[137]1880,1890,1900,1910,1920,1930,1940,1950,1960,1970,1980,1990,2000,2010,2020,2030
1830 A[178][197](A$)[171]16
1840 [145]A[137]2040,2050,2060,2070,2080,2090,2100,2110,2120,2130,2140,2150,2160,2170,2180,2190,2200
1850 A[178][197](A$)[171]33
1860 [145]A[137]2210,2220,2230,2240,2250,2260,2270,2280
1870 [139]A[177]8[137]1310
1880 D$[178]"481-9047":QL$[178]"10PM-7AM (null)ASSWORD = ":[142]:[143] #01
1890 D$[178]"272-0709":[142]:[143] #02
1900 D$[178]"487-5833":[142]:[143] #03
1910 D$[178]"481-8661":[142]:[143] #04
1920 D$[178]"633-0185":[142]:[143] #05
1930 D$[178]"487-2593":[142]:[143] #06
1940 D$[178]"279-4236":[142]:[143] #07
1950 D$[178]"231-9607":[142]:[143] #08
1960 D$[178]"469-3305":[142]:[143] #09
1970 D$[178]"454-5330":[142]:[143] #10
1980 D$[178]"281-9452":[142]:[143] #11
1990 D$[178]"624-5431":[142]:[143] #12
2000 D$[178]"667-6708":[142]:[143] #13
2010 D$[178]"783-6984":[142]:[143] #14
2020 D$[178]"823-1930":[142]:[143] #15
2030 D$[178]"454-3046":[142]:[143] #16
2040 D$[178]"277-9163":[142]:[143] #17
2050 D$[178]"270-3491":[142]:[143] #18
2060 D$[178]"534-2859":[142]:[143] #19
2070 D$[178]"592-9705":[142]:[143] #20
2080 D$[178]"621-9659":[142]:[143] #21
2090 D$[178]"481-9219":[142]:[143] #22
2100 D$[178]"224-1987":[142]:[143] #23
2110 D$[178]"279-9154":[142]:[143] #24
2120 D$[178]"792-7766":[142]:[143] #25
2130 D$[178]"275-0360":[142]:[143] #26
2140 D$[178]"826-3590":[142]:[143] #27
2150 D$[178]"622-9178":[142]:[143] #28
2160 D$[178]"488-9718":[142]:[143] #29
2170 D$[178]"624-9615":[142]:[143] #30
2180 D$[178]"451-5445":[142]:[143] #31
2190 D$[178]"635-7775":[142]:[143] #32
2200 D$[178]"278-9137":[142]:[143] #33
2210 D$[178]"366-2069":[142]:[143] #34
2220 D$[178]"499-9824":[142]:[143] #35
2230 D$[178]"964-6886":[142]:[143] #36
2240 D$[178]"494-8046":[142]:[143] #37
2250 D$[178]"766-3038":[142]:[143] #38
2260 D$[178]"921-8179":[142]:[143] #39
2270 D$[178]"925-8291":[142]:[143] #40
2280 [137]1340
2290 S[178]54272:[129]L[178]0[164]24:[151]S[170]L,0:[130]:[151]S[170]1,130:[151]S[170]5,9:[151]S[170]15,30:[151]S[170]24,15
2300 [129]L[178]1[164]4:[151]S[170]4,21:[129]T[178]1[164]60:[130]:[151]S[170]4,35:[129]T[178]1[164]60:[130]:[130]
2310 [151]S[170]24,0:[151]S[170]15,0:[151]S[170]5,0:[151]S[170]1,0:[129]L[178]0[164]24:[151]S[170]L,0:[130]
2320 [143]
2330 [153]"LOAD":[151]2023,0:[153]:[153]:[153]:[137]1440
2340 [159]6,8,15:[153]"LOAD":[137]2650
2350 [159]7,8,0,"$0":NQ[178]0
2360 [161]#7,A$,B$
2370 [161]#7,A$,B$
2380 [161]#7,A$,B$
2390 C[178]0:NQ[178]NQ[170]1:[139]A$[179][177]""[167]C[178][198](A$)
2400 [139]B$[179][177]""[167]C[178]C[170][198](B$)[172]256
2410 [153]""[202]([196](C),2);[163]3);"WAIT";:[139]NQ[178]1[167][153]"CMDCMD ";
2420 [161]#7,B$:[139] ST [179][177]0[167]2510
2430 [139]B$[179][177][199](34)[167]2420
2440 [161]#7,B$:[139]B$[179][177][199](34)[167][153]B$;:[137]2440
2450 [161]#7,B$:[139]B$[178][199](32)[167]2450
2460 [153][163]18);:C$[178]""
2470 C$[178]C$[170]B$:[161]#7,B$:[139]B$[179][177]""[167]2470
2480 [153]""[200](C$,3)
2490 [161]T$:[139]T$[179][177]""[167][141]2530
2500 [139]ST[178]0[167]2370
2510 [153]" BLOCKS FREE"
2520 [160]7:[137]2650
2530 [139]T$[178]"Q"[167][160]7:[160]6:[137]200
2540 [161]T$:[139]T$[178]""[137]2530
2550 [142]
2560 [143] DISK COMMANDS
2570 C$[178]"":[153]">";
2580 [161]B$:[139]B$[178]""[167]2580
2590 [153]B$;:[139]B$[178][199](13)[167]2610
2600 C$[178]C$[170]B$:[137]2580
2610 [152]6,C$
2620 [153]""
2630 [161]#6,A$:[153]A$;:[139]A$[179][177][199](13)[137]2630
2640 [153]"WAIT"
2650 [153]"D-DIRECTORY"
2660 [153]">-DISK COMMAND"
2670 [153]"Q-QUIT"
2680 [153]"S-DISK STATUS"
2690 [161]A$:[139]A$[178]""[167]2690
2700 [139]A$[178]"D"[167]2350
2710 [139]A$[178]"."[176]A$[178]">"[176]A$[178]">"[167]2560
2720 [139]A$[178]"Q"[167][160]6:[160]7:[137]200
2730 [139]A$[178]"S"[167]2620
2740 [137]2690
2750 [143] CHECK USR RETURN VALUE
2760 NB[178]NB[171](NB[179]0)[172]65536
2770 [139]NB[179]61440[167]UE[178]0:[142]
2780 [139]NB[178]61440[167]UE[178]128:[142]
2790 [153]"READ ERROR# ";NB[171]61440:[142]
3160 [153]"(null)ETURN ATNBORTS...":TY$[178]"PSP":[153]"(null)ROGRAM (null)AME? ";:[141]3290:[139]I$[178]""[167]200
3161 [153]"((null))RG. ((null))EQ. ((null))ORDPRO?"
3162 [161]A$:[139]A$[178]"P"[176]A$[178]"(null)"[167]SA[178]0:PK[178]1:I$[178]I$[170]",P,R":[137]3166
3163 [139]A$[178]"W"[176]A$[178]"(null)"[167]SA[178]0:PK[178]3:I$[178]I$[170]",P,R":[137]3166
3164 [139]A$[178]"S"[176]A$[178]"(null)"[167]SA[178]2:PK[178]2:I$[178]I$[170]",S,R":[137]3166
3165 [137]3162
3166 [160]1:[160]2:[159]1,8,15:[159]2,8,SA,I$:[132]1,A,B$,C,D
3167 [139]A[177]0[167][153]A;""B$"WAIT";C;D:[160]2:[160]1:[137]3160
3180 [158]49173:[151]51227,PK:[158]49164:[139][194](512)[178]1[167][160]2:[160]1:[137]190
3190 [158]49173:[151]51224,BS:[158]49158:[160]2:[160]1:[137]190
3200 [153]"(null)ETURN ATNBORTS...":TY$[178]"PSP":[153]"(null)AVE ATNS? ";:[141]3290:[139]I$[178]""[167]200
3210 [158]49173:[158]49161:[139][194](512)[178]1[167]190
3220 T$[178]","[170][202]("PSP",[194](51227),1)[170]",W"
3221 [139][194](51227)[178]1[167][153]"(null)ECEIVING (null)(null)CHR$ ASCILE":[137]3230
3222 [139][194](51227)[178]2[167][153]"(null)ECEIVING (null)VAL(null) ASCILE":[137]3230
3223 [139][194](51227)[178]3[167][153]"(null)ECEIVING (null)(null)(null) ASCILE":[137]3230
3230 [159]2,8,2,"@0:"[170]I$[170]T$:[129]X[178]1[164]1300:[130]X:[153]:[158]61310
3240 [158]49173:[158]49155:[160]2:[129]X[178]1[164]1000:[151]668,[194](667):[137]190
3250 [153]"(null)ETURN ATNBORTS...":[153]"PEEKLOCK (null)IZE? ";:[141]3290:[139]I$[178]""[167]200
3260 BS[178][197](I$):[139]BS[179]40[167]BS[178]40
3270 [139]BS[177]255[167]BS[178]255
3280 [151]51224,BS:[137]200
3290 I$[178]""
3300 [153]" WAITCMD";
3310 [161]A$:[139]A$[178]""[167]3310
3320 [139]A$[178][199](13)[167]3390
3330 [139]A$[178][199](20)[167]3370
3340 [139][195](A$)[177]20[167]3310
3350 [139]([198](A$)[175]127)[179]32[167]3310
3360 [153]A$;:I$[178]I$[170]A$:[137]3300
3370 [139][195](I$)[178]0[167]3310
3380 [153]" CMDCMD";:I$[178][200](I$,[195](I$)[171]1):[137]3300
3390 [153]" ":[142]
7000 [143] *** TONE DIAL SET UP
7010 SI[178]54272
7020 [151]SI[170]24,15:[151]SI[170]4,16
7030 [151]SI[170]11,16:[151]SI[170]5,0:[151]SI[170]12,0
7040 [151]SI[170]6,15[172]16:[151]SI[170]13,15[172]16:[151]SI[170]23,0:[142]
10000 [153][194](56577),[194](56579)
10001 [137]10000
20000 [139]A$[178]"5"[167][151]56579,32:[151]56577,95
20001 [139]A$[178]"6"[167][151]56577,127
20002 [137]200